/**
 *    Copyright 2012 Geensoft S.A.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/
package ar.com.greensoft.commons.web.export.impl;

import ar.com.greensoft.commons.web.export.ExportColInfo;

/**
 * @author Jorge E. Villaverde
 * @version 0.0.1
 * @since 0.0.1
 */
public class ExportColInfoImpl implements ExportColInfo {
	
	private static final int DEFAULT_COLUMN_WIDTH = 10000;
	
	private final int columnNumber;
	private int columnWidth;
	private String columnName;

	public ExportColInfoImpl(int columnNumber, String columnName) {
		this(columnNumber, columnName, DEFAULT_COLUMN_WIDTH);
	}

	public ExportColInfoImpl(int columnNumber, String columnName, int columnWidth) {
		super();
		this.columnNumber = columnNumber;
		this.columnName = columnName;
		this.columnWidth = columnWidth;
	}

	@Override
	public int getColumnNumber() {
		return columnNumber;
	}

	@Override
	public int getColumnWidth() {
		return columnWidth;
	}

	@Override
	public String getColumnName() {
		return columnName;
	}

	public String toString(){
		return "["+columnNumber+"] = " + columnName;
	}

}
